from rest_framework import serializers
from apps.activity.models import Gathering

# 获取活动详情序列化器
class GatheringDetailsSerializer(serializers.ModelSerializer):

    class Meta:
        model = Gathering
        fields = '__all__'

# 活动列表序列化器
class GatheringsSerializer(serializers.ModelSerializer):

    class Meta:
        model = Gathering
        fields = ['id','name','image','city','starttime','endrolltime','users']